package org.ljm.basic.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbUtil {

	public static Connection getConn() throws SQLException{
		Connection con = DriverManager
				.getConnection("jdbc:mysql://localhost:3306/cms_test", "yqc", "yqc2014");
		return con;
	}
	
	public static void close(Connection con){
		if(con != null){
			try {
				con.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}
}
